package ynu.edu.ky_elm_springboot3.controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import ynu.edu.ky_elm_springboot3.po.Food;
import ynu.edu.ky_elm_springboot3.service.FoodService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;

@Tag(name = "食品相关接口")
@RestController
@RequestMapping("/FoodController")
public class FoodController {

    @Autowired
    private FoodService foodService;
    
    @Operation(summary = "查询商家食品")
    @GetMapping("/listFoodByBusinessId")
    public List<Food> listFoodByBusinessId(@RequestParam("businessId") Integer businessId) {
        return foodService.listFoodByBusinessId(businessId);
    }
} 